import { _decorator, Component, Node, Button, director } from 'cc';
import { GameManager } from '../GameManager';
const { ccclass, property } = _decorator;

@ccclass('UIGameOver')
export class UIGameOver extends Component {
    @property(Button)
    public BackBtn:Button
    start() {
        this.BackBtn.node.on(Button.EventType.CLICK, this.OnClickBtn, this);

    }

    OnClickBtn(btn:Button)
    {
        console.log("GG")
        localStorage.removeItem("userdata")
        GameManager.instance.GameOver()
        director.loadScene("start")
        this.node.destroy()
    }
}


